#include<bits/stdc++.h>
#include"testlib.h"
#define int long long
#define rep(i,a,b) for(int i(a);i<=(b);++i)
#define req(i,a,b) for(int i(a);i>=(b);--i)
#define sort stable_sort
using namespace std;
signed main(signed argc,char* argv[])
{
	registerLemonChecker(argc,argv);
	string s=inf.readToken(),t=inf.readToken();
	string stat=ouf.readToken(),answ=ans.readToken();
	if(stat!=answ) quitf(_wa,answ=="YES"?"Solution exists but you didn't find it":"Solution doesn't exist but you found one");
	if(answ=="NO") quitf(_ok,"Correct");
	vector<int> p(t.size(),0);
	for(auto &x:p) x=ouf.readLong();
	int pre=0;
	for(auto &x:p)
	{
		if(x<1||x>(int)s.size()) quitf(_wa,"Index out of range");
		if(x<=pre) quitf(_wa,"You didn't output a strictly increasing sequence");
		pre=x;
	}
	for(auto &x:p) --x;
	for(int i=0;i<(int)p.size();++i) if(s[p[i]]!=t[i]) quitf(_wa,"Character mismatch");
	p.insert(p.begin(),-1);
	p.emplace_back(s.size());
	for(int i=0;i<(int)p.size()-1;++i)
	{
		char expect=s[p[i]+1];
		rep(j,p[i]+1,p[i+1]-1) if(s[j]!=expect) quitf(_wa,"Character not unique");
	}
	quitf(_ok,"Correct");
	return 0;
}
